const express = require('express')
const app = express()
const crawling = require('./crawling')
app.use('/node_modules', express.static('./node_modules'))
app.use('/public', express.static('./public'))
app.engine('html', require('express-art-template'));

app.get('/', (req, res) => {
    res.render('index.html')
})

app.get('/getLaGouInfo', async (req, res) => {
    await crawling(req.query)
    res.status(200).send('success')
})

app.listen(3000, () => {
    console.log("running 127.0.0.1:3000");
})